package com.example.springaop.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Aspect
@Component
@Slf4j
public class MyAnnotationAspect {
    @Before("@annotation(com.example.springaop.config.MyAspect)")
    public void doBefore(){
        log.info("before start...");
    }

    @After("@annotation(com.example.springaop.config.MyAspect)")
    public void doAfter(){
        log.info("after start...");
    }
}
